import { getBoleList, updateBole, closeBole, downloadData } from '../../api/bole'
const bole = {
    namespaced: true,
    state: {

    },
    getters: {

    },
    mutations: {

    },
    actions: {
        GetBoleList({ state, commit, dispatch }, params) {
            return new Promise((resolve, reject) => {
                getBoleList(params).then(res => {
                    resolve(res)
                }).catch(err => {
                    reject(err)
                })
            })
        },
        UpdateBole({ state, commit, dispatch }, id) {
            return new Promise((resolve, reject) => {
                updateBole(id).then(res => {
                    resolve(res)
                })
            })
        },
        CloseBole({ state, commit, dispatch }, id) {
            return new Promise((resolve, reject) => {
                closeBole(id).then(res => {
                    resolve(res)
                })
            })
        },
        DownloadData({ state, commit, dispatch }, params) {
            return new Promise((resolve, reject) => {
                downloadData(params).then(res => {
                    resolve(res)
                })
            })
        }
        
    }
}

export default bole
